/*

import '../../../utils/color.dart';
 * @Author: wangdazhuang
 * @Date: 2024-10-17 00:55:10
 * @LastEditTime: 2024-10-17 00:57:53
 * @LastEditors: wangdazhuang
 * @Description: 
 * @FilePath: /pornhub_app/lib/src/views/mine/frontpage/change_icon_pop.dart
 */
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get_utils/src/extensions/widget_extensions.dart';
import 'package:pornhub_app/components/app_bg_view.dart';
import 'package:pornhub_app/utils/extension.dart';

import '../../../assets/styles.dart';
import '../../../generate/app_image_path.dart';
import '../../../utils/color.dart';

class ChangeIconPop extends StatefulWidget {
  final VoidCallback? tap;
  const ChangeIconPop({super.key, this.tap});

  @override
  State<StatefulWidget> createState() {
    return ChangeAppIconState();
  }
}

// ignore: camel_case_types
class ChangeAppIconState extends State<ChangeIconPop> {
  @override
  Widget build(BuildContext context) {
    return Container(
      width: 300.w,
      height: 192.w,
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.circular(12),
      ),
      child: Column(
        mainAxisAlignment: MainAxisAlignment.start,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          Text("温馨提示",
                  style: kTextStyle(COLOR.color_333333,
                      fontsize: 16.w, weight: FontWeight.w500))
              .marginOnly(top: 15.w),
          Container(
                  height: 1.w,
                  width: double.infinity,
                  color: COLOR.hexColor("#F0F0F0"))
              .marginOnly(top: 15.w),
          Text("更换LOGO后，返回主页等待一分钟左右\n再重新进入可正常使用",
                  style: kTextStyle(COLOR.color_333333, fontsize: 14.w))
              .marginOnly(top: 15.w),
          SizedBox(
            width: 244.w,
            child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                Container(
                  alignment: Alignment.center,
                  width: 112.w,
                  height: 36.w,
                  decoration: BoxDecoration(
                    color: COLOR.hexColor("#eee"),
                    borderRadius: BorderRadius.circular(20),
                  ),
                  child: Text(
                    "取消",
                    style: TextStyle(
                        color: COLOR.hexColor("#666"),
                        fontSize: 16.w,
                        fontWeight: FontWeight.w500),
                  ),
                ).onTap(() {
                  SmartDialog.dismiss();
                }),
                AppBgView(
                  onTap: (() {
                    if (widget.tap != null) {
                      widget.tap!();
                    }
                  }),
                  width: 112.w,
                  height: 36.w,
                  fit: BoxFit.fill,
                  radius: 18.w,
                  imagePath: AppImagePath.mine_img_login_btn,
                  child: Text(
                    "更换",
                    style: TextStyle(
                        color: COLOR.hexColor("#fff"),
                        fontSize: 16.w,
                        fontWeight: FontWeight.w500),
                  ),
                ),
              ],
            ).marginOnly(top: 25.w),
          ),
        ],
      ),
    );
  }
}
